<?php
function smarty_function_hsinput($params, $smarty) {
    $template = "hsinput.tpl";
    $inputparams = "";
    $id = "";
    $val = "";
    $hscode = "";
    foreach ($params as $key=>$value) {
        if ($key == "id") {
            $id = $value;
        } else if ($key == "hscode") {
            $hscode = $value;
        } else if ($key == "class") {
            $classes = $value;
        } else {
            $inputparams .= "$key='$value' ";
        }
    }
    $smarty->assign("id", $id);
    $smarty->assign("hscode", $hscode);
    $smarty->assign("params", $inputparams);
    $smarty->assign("classes", $classes);
    return $smarty->fetch("plugins/$template");
}

?>
